package com.xbongbong.workflow.pojo;

import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.annotation.JSONField;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;

/**
 * 触发数据
 * @author 魏荣杰
 * @date 2021/5/10 10:14
 * @since
 * @version
 */
@Setter
@Getter
public class Data implements Serializable {

	private static final long serialVersionUID = -4956989667798985993L;
	/**
	 * 表单id
	 */
	@JSONField(name="formId")
	private Long formId;

	/**
	 * 触发数据data
	 */
	@JSONField(name="data")
	private JSONObject data;

	/**
	 * 应用id
	 */
	@JSONField(name="appId")
	private Long appId;

	/**
	 * 菜单id
	 */
	@JSONField(name="menuId")
	private Long menuId;

	/**
	 * 触发数据id
	 */
	@JSONField(name="id")
	private Long id;

	/**
	 * 触发数据业务类型
	 */
	@JSONField(name="businessType")
	private Integer businessType;

	/**
	 * 触发数据业务标识，1saas，2paas
	 * @see com.xbongbong.pro.enums.SaasMarkEnum
	 */
	@JSONField(name="saasMark")
	private Integer saasMark;
	/**
	 * 触发节点id
	 */
	@JSONField(name="nodeId")
	private Long nodeId;

	/**
	 * 触发数据子业务类型
	 */
	private Integer subBusinessType;

	public Data() {
	}

	public Data(Long appId, Long menuId, Long formId, Long id, JSONObject data, Integer businessType, Integer saasMark, Long nodeId, Integer subBusinessType) {
		this.formId = formId;
		this.data = data;
		this.appId = appId;
		this.menuId = menuId;
		this.id = id;
		this.businessType = businessType;
		this.saasMark = saasMark;
		this.nodeId = nodeId;
		this.subBusinessType = subBusinessType;
	}
}